<template>
  <tree-node :data="data" :selected="selected"  @selectNode="selectNode"/>
</template>
<script>
import TreeNode from './TreeNode.vue'
export default {
  components: { TreeNode },
  props:["data","selected"],
  setup(props,{emit}){
    const selectNode = (node,e)=>{
      emit("update:selected",node)
    }
    return {
      selectNode
    }
  }
}
</script>